#ifndef __GAME_ENUM_H__
#define __GAME_ENUM_H__

#include <string>

namespace PocketSurvival
{
    // 玩家性别
    enum class PlayerClass
    {
        Male,  // 男
        Female // 女
    };
    extern const std::string PlayerClassStr[2];

    // 游戏模式
    enum class GameMode
    {
        Creative,    // 创造
        Harmless,    // 无害
        Survival,    // 生存
        Challenging, // 挑战
        Cruel,       // 残酷
        Adventure    // 闯关
    };
    extern const std::string GameModeStr[6];

    // 玩家的自定义模式
    enum class PlayerGameMode
    {
        Creative,      // 创造
        Harmless,      // 无害
        Survival,      // 生存
        Challenging,   // 挑战
        Cruel,         // 残酷
        Adventure,     // 闯关
        Follow = 0xFF, // 跟随系统
    };

    enum class ClientState
    {
        NotConnected,
        Connected,
        ProjectLoaded,
        LoadTerrain,
        Playing
    };

    enum class InteractType
    {
        None = 0,
        Interact = 1,
        Hit = 1 << 1,
        Aim = 1 << 2,
        Dig = 1 << 3,
        EndDig = 1 << 4,
        EndAim = 1 << 5,
        CancelAim = 1 << 6
    };

    enum class EditableItemType
    {
        MemoryBank = 0,
        TruthTable = 1,
        AdjustableDelayGate = 2,
        Battery = 3,
        Piston = 4
    };

    enum class EnvironmentBehaviorMode
    {
        Living,
        Static
    };
    extern const std::string EnvironmentBehaviorModeStr[2];

    enum class TimeOfDayMode
    {
        Changing,
        Day,
        Night,
        Sunrise,
        Sunset
    };
    extern const std::string TimeOfDayModeStr[5];

    enum class TerrainGenerationMode
    {
        Continent,     // 大陆
        Island,        // 海岛
        FlatContinent, // 平地大陆
        FlatIsland     // 平地海岛
    };
    extern const std::string TerrainGenerationModeStr[4];

    enum class StartingPositionMode
    {
        Easy,
        Medium,
        Hard
    };
    extern const std::string StartingPositionModeStr[3];

    enum class BreathingMode
    {
        Air,
        Water
    };
    extern const std::string BreathingModeStr[2];

    enum class AimState
    {
        InProgress,
        Cancelled,
        Completed
    };

    enum class ProjectileStoppedAction
    {
        TurnIntoPickable,
        Disappear,
        DoNothing
    };

    enum class DragMode
    {
        AllItems,
        SingleItem
    };

    enum class CreatureCategory
    {
        LandPredator = 0x1,
        LandOther = 0x2,
        WaterPredator = 0x4,
        WaterOther = 0x8,
        Bird = 0x10
    };

    enum class InjureType
    {
        Unknow,        // 未知
        Choke,         // 自杀
        Cactus,        // 仙人掌刺伤
        Fall,          // 摔伤
        Fire,          // 着火
        BeAttacked,    // 被攻击
        FoodPoisoning, // 食物中毒
        Coldness,      // 寒冷

        Plugin, // 来自插件的伤害
    };

    enum class RaycastMode
    {
        Digging,
        Interaction,
        Gathering
    };

    enum class LoginType
    {
        UnLimit,        // 没有限制
        Local,          // 有本地记录才能进入，不开启社区验证
        CommunityLocal, // 社区本地，就是有开启社区验证，但是登录时只检测本地数据
        NeedCommunity   // 需要社区验证
    };

    enum class TreeType
    {
        Oak,
        Birch,
        Spruce,
        TallSpruce,
        Mimosa,

        None = 0xFF
    };

} // namespace PocketSurvival

#endif